<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title
	th:text="@{${match.homeTeam}+'vs'+${match.guestTeam}+'|'+${match.leagueName}+${match.season}}"></title>
<head th:include="include :: header">
</head>

<body class="gray-bg">
	<div class="wrapper wrapper-content text-center">
		<div class="row">
			<div class="col-sm-9">
				<div class="col-sm-2"></div>
				<div class="col-sm-2 text-right">
					<h2>
						<strong><sup
							th:text="@{'['+${match.hometeamRanking}}+']'"></sup><span
							th:text="${match.homeTeam}"></span></strong>
					</h2>
				</div>
				<div class="col-sm-2 text-center" th:switch="${match.result}">
					<h2 th:case="'3'">
						<strong><span th:class="text-danger"
							th:text="${homeScore}"></span>-<span th:class="text-success"
							th:text="${guestScore}"></span></strong>
					</h2>
					<h2 th:case="'1'">
						<strong><span th:text="${match.score}"></span></strong>
					</h2>
					<h2 th:case="'0'">
						<strong><span th:class="text-success"
							th:text="${homeScore}"></span>-<span th:class="text-danger"
							th:text="${guestScore}"></span></strong>
					</h2>
				</div>
				<div class="col-sm-2 text-left">
					<h2>
						<strong><span th:text="${match.guestTeam}"></span><sup
							th:text="@{'['+${match.guestteamRanking}}+']'"></sup></strong>
					</h2>
				</div>
				<div class="col-sm-2"></div>
			</div>
			<div class="col-sm-9">
				<div class="col-sm-3 text-right">
					<span
						th:text="${#dates.format(match.matchDate, 'yyyy-MM-dd hh:mm')}"></span>
				</div>
				<div class="col-sm-3 text-center">
					<span th:text="@{${match.leagueName}+' '+${match.season}}"></span>
				</div>
				<div class="col-sm-3 text-left">
					<span th:text="@{'第'+${match.turn}+'轮'}"></span>
				</div>
			</div>
			<div>
				<div class="col-sm-9 text-center bg-success">
					<div class="col-sm-3">
						<span th:text="${match.homeTeam}"></span> <select><option>全赛事</option></select>
					</div>
					<div id="hometeamContent"></div>
				</div>
			</div>

			<div>
				<div class="col-sm-9 text-center bg-success">
					<div class="col-sm-3">
						<span th:text="${match.guestTeam}"></span> <select><option>全赛事</option></select>
					</div>
					<div>
						<table class="table table-hover table-bordered">
							<thead>
								<tr class="bg-success">
									<th class="col-1 text-center">时间</th>
									<th class="col-1 text-center">联赛</th>
									<th class="col-1 text-center">轮次</th>
									<th class="col-1 text-center">主队</th>
									<th class="col-1 text-center">比分</th>
									<th class="col-1 text-center">客队</th>
									<th class="col-3 text-center">分析</th>
								</tr>
							</thead>
							<tbody>
								<tr th:each="match2:${guestMatchList}"
									th:class="${match2Stat.odd?'success':''}">
									<td class="col-1 text-center"
										th:text="${#dates.format(match2.matchDate, 'yyyy-MM-dd hh:mm')}"></td>
									<td class="col-1 text-center" th:text="${match2.leagueName}"></td>
									<td class="col-1 text-center" th:text="${match2.turn}"></td>
									<td class="col-1 text-center" th:text="${match2.homeTeam}"></td>
									<td class="col-1 text-center" th:text="${match2.score}"></td>
									<td class="col-1 text-center" th:text="${match2.guestTeam}"></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>


		</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript">
		$(document).ready(
				function() {
					$.get("/oupei/match/geHistoryMatch/128/156/2018-06-30/5/30",
							function(data, status) {
								$("#hometeamContent").after(data);
							});
				});
	</script>
</body>
</html>
